﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Office.Server.ActivityFeed;
using Microsoft.Office.Server.UserProfiles;
using ESF.SharePoint.Helpers.Utility;

namespace ESF.SharePoint.Domain
{
    public class QueryActivityManagerContext
    {
        private ActivityManager _ActivityManager;
        public ActivityManager GetInstance()
        {
            return GetInstance(null);
        }

        public ActivityManager GetInstance(UserProfile userProfile)
        {
            if (userProfile == null)
                userProfile = UserProfileHelper.GetUserProfile();
            
            if (this._ActivityManager == null)
            {
                this._ActivityManager = new ActivityManager(userProfile);
            }
            return this._ActivityManager;
        }
    }
}
